import { createRouter, createWebHistory } from "vue-router";

const routes = [
    //任務大廳
    {
        path: "/",
        name: "missions",
        component: () => import("../views/missions/index.vue"),
    },
    //任務發佈
    {
        path: "/add",
        name: "add",
        component: () => import("../views/missions/add.vue"),
    },
    //任務详情
    {
        path: "/del",
        name: "del",
        component: () => import("../views/missions/del.vue"),
    },
    //我来接单
    {
        path: "/jd",
        name: "jd",
        component: () => import("../views/missions/jd.vue"),
    },
    //我的任務
    {
        path: "/myMissions",
        name: "myMissions",
        component: () => import("../views/myMissions/index.vue"),
    },
    //我接单的任務
    {
        path: "/myReceiveTask",
        name: "myReceiveTask",
        component: () => import("../views/myMissions/myReceiveTask.vue"),
    },
    //我发布的任務
    {
        path: "/myBuildTask",
        name: "myBuildTask",
        component: () => import("../views/myMissions/myBuildTask.vue"),
    },
    //我的任務
    {
        path: "/enough",
        name: "enough",
        component: () => import("../views/myMissions/enough.vue"),
    },
    //我的月报
    {
        path: "/myReport",
        name: "myReport",
        component: () => import("../views/myMissions/myReport.vue"),
    },
    //组员互评
    {
        path: "/salary",
        name: "salary",
        component: () => import("../views/salary/index.vue"),
    },
    //申请薪资
    {
        path: "/applySalary",
        name: "applySalary",
        component: () => import("../views/salary/applySalary.vue"),
    },
    //评价详情
    {
        path: "/salaryDetail",
        name: "salaryDetail",
        component: () => import("../views/salary/salaryDetail.vue"),
    },
    //小组奖金
    {
        path: "/groupSalary",
        name: "groupSalary",
        component: () => import("../views/groupSalary/index.vue"),
    },
    //申请小组奖金
    {
        path: "/applyGroupSalary",
        name: "applyGroupSalary",
        component: () => import("../views/groupSalary/applySalary.vue"),
    },
    //小组奖金详情
    {
        path: "/salaryGroupDetail",
        name: "salaryGroupDetail",
        component: () => import("../views/groupSalary/salaryDetail.vue"),
    },
    //排行榜
    // {
    //     path: "/ranking",
    //     name: "ranking",
    //     component: () => import("../views/evaluation/rankingList.vue"),
    //     children: [
    //         {
    //             path: "person",
    //             name: "person",
    //             component: () => import("../views/evaluation/rankingPerson.vue"),
    //         },
    //         {
    //             path: "department",
    //             name: "department",
    //             component: () => import("../views/evaluation/rankingDepartment.vue"),
    //         },
    //     ],
    // },
    //消息
];

const router = createRouter({
    history: createWebHistory(process.env.BASE_URL),
    routes,
    scrollBehavior() {
        return { x: 0, y: 0 };
    },
});

export default router;
